<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\fcs\vpos\service\guide;

class TaskPerformance {
	
	static $_TSPEC;
	public $orderAmount = null;
	public $orderQty = null;
	public $orderCustomerQty = null;
	public $uv = null;
	public $transferCustomerQty = null;
	public $newSvipQty = null;
	public $taskCompletionRate = null;
	public $followTaskQty = null;
	public $requiredReachCustomerQry = null;
	public $successReachCustomerQry = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'orderAmount'
			),
			2 => array(
			'var' => 'orderQty'
			),
			3 => array(
			'var' => 'orderCustomerQty'
			),
			4 => array(
			'var' => 'uv'
			),
			5 => array(
			'var' => 'transferCustomerQty'
			),
			6 => array(
			'var' => 'newSvipQty'
			),
			7 => array(
			'var' => 'taskCompletionRate'
			),
			8 => array(
			'var' => 'followTaskQty'
			),
			9 => array(
			'var' => 'requiredReachCustomerQry'
			),
			10 => array(
			'var' => 'successReachCustomerQry'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['orderAmount'])){
				
				$this->orderAmount = $vals['orderAmount'];
			}
			
			
			if (isset($vals['orderQty'])){
				
				$this->orderQty = $vals['orderQty'];
			}
			
			
			if (isset($vals['orderCustomerQty'])){
				
				$this->orderCustomerQty = $vals['orderCustomerQty'];
			}
			
			
			if (isset($vals['uv'])){
				
				$this->uv = $vals['uv'];
			}
			
			
			if (isset($vals['transferCustomerQty'])){
				
				$this->transferCustomerQty = $vals['transferCustomerQty'];
			}
			
			
			if (isset($vals['newSvipQty'])){
				
				$this->newSvipQty = $vals['newSvipQty'];
			}
			
			
			if (isset($vals['taskCompletionRate'])){
				
				$this->taskCompletionRate = $vals['taskCompletionRate'];
			}
			
			
			if (isset($vals['followTaskQty'])){
				
				$this->followTaskQty = $vals['followTaskQty'];
			}
			
			
			if (isset($vals['requiredReachCustomerQry'])){
				
				$this->requiredReachCustomerQry = $vals['requiredReachCustomerQry'];
			}
			
			
			if (isset($vals['successReachCustomerQry'])){
				
				$this->successReachCustomerQry = $vals['successReachCustomerQry'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'TaskPerformance';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("orderAmount" == $schemeField){
				
				$needSkip = false;
				$input->readDouble($this->orderAmount);
				
			}
			
			
			
			
			if ("orderQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->orderQty); 
				
			}
			
			
			
			
			if ("orderCustomerQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->orderCustomerQty); 
				
			}
			
			
			
			
			if ("uv" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->uv); 
				
			}
			
			
			
			
			if ("transferCustomerQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->transferCustomerQty); 
				
			}
			
			
			
			
			if ("newSvipQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->newSvipQty); 
				
			}
			
			
			
			
			if ("taskCompletionRate" == $schemeField){
				
				$needSkip = false;
				$input->readDouble($this->taskCompletionRate);
				
			}
			
			
			
			
			if ("followTaskQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->followTaskQty); 
				
			}
			
			
			
			
			if ("requiredReachCustomerQry" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->requiredReachCustomerQry); 
				
			}
			
			
			
			
			if ("successReachCustomerQry" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->successReachCustomerQry); 
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		if($this->orderAmount !== null) {
			
			$xfer += $output->writeFieldBegin('orderAmount');
			$xfer += $output->writeDouble($this->orderAmount);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->orderQty !== null) {
			
			$xfer += $output->writeFieldBegin('orderQty');
			$xfer += $output->writeI32($this->orderQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->orderCustomerQty !== null) {
			
			$xfer += $output->writeFieldBegin('orderCustomerQty');
			$xfer += $output->writeI32($this->orderCustomerQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->uv !== null) {
			
			$xfer += $output->writeFieldBegin('uv');
			$xfer += $output->writeI32($this->uv);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->transferCustomerQty !== null) {
			
			$xfer += $output->writeFieldBegin('transferCustomerQty');
			$xfer += $output->writeI32($this->transferCustomerQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->newSvipQty !== null) {
			
			$xfer += $output->writeFieldBegin('newSvipQty');
			$xfer += $output->writeI32($this->newSvipQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->taskCompletionRate !== null) {
			
			$xfer += $output->writeFieldBegin('taskCompletionRate');
			$xfer += $output->writeDouble($this->taskCompletionRate);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->followTaskQty !== null) {
			
			$xfer += $output->writeFieldBegin('followTaskQty');
			$xfer += $output->writeI32($this->followTaskQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->requiredReachCustomerQry !== null) {
			
			$xfer += $output->writeFieldBegin('requiredReachCustomerQry');
			$xfer += $output->writeI32($this->requiredReachCustomerQry);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->successReachCustomerQry !== null) {
			
			$xfer += $output->writeFieldBegin('successReachCustomerQry');
			$xfer += $output->writeI32($this->successReachCustomerQry);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>